<?php
function form_select_day($name = '', $options = array(), $selected = array(), $extra = '')
{
	$_options = array();
	
	for ($i = 1; $i < 32; $i++)
	{
		$_options[$i] = $i;
	}
	
	$options = $options + $_options;
	
	return form_dropdown($name, $options, $selected, $extra);
}	
	
function form_select_month($name = '', $options = array(), $selected = array(), $extra = '')
{
	// the months
	$month[1] = T_('January');
	$month[2] = T_('February');
	$month[3] = T_('March');
	$month[4] = T_('April');
	$month[5] = T_('May');
	$month[6] = T_('June');
	$month[7] = T_('July');
	$month[8] = T_('August');
	$month[9] = T_('September');
	$month[10] = T_('October');
	$month[11] = T_('November');
	$month[12] = T_('December');

	$options = $options + $month;
	
	return form_dropdown($name, $options, $selected, $extra);
}	
	
function form_select_year($name = '', $options = array(), $selected = array(), $extra = '')
{
	$_options = array_merge($options,
		array(
			'start_year' => 1901,
			'finish_year' => date('Y'),
			'order' => 'desc',
		)
	);
	
	$options = array();
	
	for ($i = $_options['start_year']; $i <= $_options['finish_year']; $i++)
	{
		$options[$i] = $i;
	}
	
	if ($_options['order'] == 'desc')
	{
		krsort($options); 
	}
	
	return form_dropdown($name, $options, $selected, $extra);
}	
?>
